package books4africa

class Ranking {
	
	int rank
	User user
	String comment
	Date dateCreated
	
    static constraints = {
		rank(matches:"[0-5]{1}")
		comment(blank:false)
    }
	
	static belongsTo = [book : Books]
	
	static mapping= {sort dateCreated:"desc"}
}
